package com.minimalist.common.entity.basic.vo.operatorlog;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.basic.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author 11987
 */
@Schema(name = "操作日志查询实体")
public class OperatorLogQueryVO extends PageReq implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "name", description = "执行方法名称", type = "string")
    private String name;

    @Schema(name = "method", description = "请求方式", type = "string")
    private String method;

    @Schema(name = "creatorName", description = "操作人", type = "string")
    private String creatorName;

    @SchemaEnum(implementation = StatusEnum.class)
    @Schema(name = "status", description = "响应状态", type = "string")
    private Integer status;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        OperatorLogQueryVO that = (OperatorLogQueryVO) o;
        return java.util.Objects.equals(name, that.name) &&
               java.util.Objects.equals(method, that.method) &&
               java.util.Objects.equals(creatorName, that.creatorName) &&
               java.util.Objects.equals(status, that.status);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), name, method, creatorName, status);
    }

    @Override
    public String toString() {
        return "OperatorLogQueryVO{" +
               "name='" + name + '\'' +
               ", method='" + method + '\'' +
               ", creatorName='" + creatorName + '\'' +
               ", status=" + status +
               "} " + super.toString();
    }

}
